import { acceptHMRUpdate, defineStore } from 'pinia'
import { ref } from 'vue'
// import api from '@/libs/api/index';

export const useConfigStore = defineStore(
  'config',
  () => {
    /** 系统配置 信息 */
    let config = ref<any>({
      showTab: true,
    })

    const hiddenTab = () => {
      config.value.showTab = false
    }

    const showTab = () => {
      config.value.showTab = true
    }

    return { config, hiddenTab, showTab }
  },
  {},
)

if (import.meta.hot) {
  import.meta.hot.accept(acceptHMRUpdate(useConfigStore, import.meta.hot))
}
